Wednesday, December 30, 2009

bye, Fred

Yesterday sucked. I work for a medium-sized family-owned company in a small community. The owner, Gabby, works there as does his brother Sam. Another brother, Fred, used to work for the company and his house is across the back alley. Yesterday morning Gabby came running in yelling "call 9-1-1!" while making a beeline for the phone himself. I said "Fred?" and he said "yeah" and I ran over to Fred's house. Fred had already had several heart attacks and was in poor health; a few months ago he said that the doctors told him his heart was down to about 18% functionality.

I went inside and saw him laying on the floor on his side, turned him over on his back and tried to find a pulse... nothing. Still warm, no heartbeat, no breathing. I started doing CPR, what I could remember from a St. John's Ambulance course years ago and from a dinner table conversation over Thanksgiving - fifteen pumps on the chest and one breath, repeat.

All the while three of Fred's brothers (Gabby, Sam, and Bill) are standing there praying and crying, with Bill so desperate to help Fred that he was holding Fred's ankle and pumping the leg in an effort to get the blood flowing, or taking over Fred's breathing with such effort that I had to remind him that Fred needed to breathe out, too. I told Gabby that someone needed to stand outside and make sure the ambulance found the place right away, and just kept pumping.

I kept giving him CPR until the paramedics came and then just pumped his chest while they got to work and kept doing that until a second set of paramedics with shock paddles came and took over for me.

Then I went back to work. What else could I do?

A while later the ambulances left with their lights off.

If someone has a heart attack, they need help within about four minutes before other systems start shutting down for good. Maybe we didn't reach him in time. Maybe his heart was so far gone that nothing short of a new heart would save him. Bottom line is, he was a good guy and I tried to save him and I couldn't and he's gone.

On Sunday, he was showing me a picture taken of him in 1981, laughing and joking. Today's they're making plans for his funeral.

You never know when your time is up, people. If you knew that today was your last day, would you hold a grudge? Would you hug someone?

Wednesday, December 16, 2009

What's the Big Deal?


From a comment on the previous post:
"The problem with Climate change is; It is real and people discount it to prolong profits unimpeded by research costs, etc. If we are wrong and it is not real, whats the worst thing that can happen? Everyone gets solar panels and doesn't have to pay for electricity? On the other hand if we are right and do nothing because people distract us or mislead us what will all the deniers do to fix their mistake? After society collapses into rich vs poor and disease and hunger spread with the changing climate. I don't think "I told you so" would cut it..."
This comment encompasses so many ideas that are (1) well within the mainstream of center-left ideology and (2) quite mistaken that I simply must respond point by point.
The problem with Climate change is;
So far, we are in agreement. There is indeed a problem here.
It is real
Yes indeed. The climate does indeed change. There are many reasons for the climate to change. First of all, there is a very big bright ball in the sky which is the source of all our energy, which might have something to do with things. Every time there is a big coronal mass ejection we get aurorae and blackouts in the electrical grids - do you think those are the only effects of millions of tons of solar plasma hitting the earth's magnetic field at a million miles an hour?

The Earth's orbit around the sun isn't a perfect, continuously-repeating-exactly-the-same-forever ellipse, either: there are other objects besides the Earth and Sun which tug gravitationally on both objects, such as Jupiter and Saturn, which cause minor orbital variations. And a relativistic effect causes the Earth's orbital precession over a period of roughly 21 thousand years:


In this diagram, the area of each quadrant is proportional to the time, and right now the northern hemisphere's spring and summer are longer than the fall and winter, whereas 2500 years ago the northern hemisphere's summer and winter were about equal length, but spring was much longer than autumn. That has a little something to do with the climate changing, too. There is not a darn thing that humankind can do to affect the Earth's orbit one iota.

Volcanic eruptions can change the climate as well: the eruption of Mount Tambora in 1815 caused the "Year Without A Summer" in 1816.

I suppose that mankind might be able to cause some sort of nuclear winter if we were so foolish as to have an all-out nuclear war. However, consider this Google Maps image of part of the Nevada Nuclear Test Site, with the biggest craters I could find there:


Note the scale at the bottom left of that image. The Nevada test site was one of the most active nuclear test sites in history. Compare that image to this Google Maps satellite image, of an area just a few humdred miles away, at the same scale:


This is Meteor Crater in Arizona. It was formed when a meteor about 50 meters wide moving somewhere around 12-20 km/s collided with the Earth about 50 thousand years ago; about half of the meteor vaporized in the atmosphere and most of the rest vaporized on impact. Or how about this image, again at the same scale:


This is Mount St. Helens, which as you may recall caused some climate havoc. I include these three pictures to show how man's influence is absolutely dwarfed by nature.

And that brings us to the central questions of the whole climate change debate. Does man have an impact on the environment? Unquestionably, yes. But by how much does mankind affect the environment? Is it enough to actually change the climate? And what would the effects of that climate change be? Would such effects be, on the whole, positive or negative? And the answers to all these questions, if we are being honest, is that we don't know.

Getting back to the comment:
and people discount it to prolong profits
There is so much that is staggeringly wrong with this statement that the mind boggles. Is climate change real? Yes. Does mankind have a statistically-significant effect on climate change? We don't know. Is the net effect detrimental or beneficial? We don't know.

That is not discounting anthropoegenic global warming, but it is a million miles away from "the science is settled". And being honest that we don't know is held as some sort of dastardly trick in order to allow something even more heinous: "prolonging profit". Without profit, no business can survive; if the income exactly balances expenditures then the business is on the knife edge of failure, and if the income drops below that level for even a short time the business can go under. What is bad about profit?
unimpeded by research costs, etc
Are you freakin' kidding me. Who do you think pays for the vast majority of research worldwide? How ironic that someone could write that comment on a computer and transmit it over a network of fiber optic cables and satellite links and coaxial cables, completely oblivious to the contributions of Bell Labs or General Electric or a million other businesses' research departments to his ability to make that comment. Is it possible that this person thinks that without the global warming scare there would be no research done by business?
If we are wrong and it is not real, whats the worst thing that can happen?
The person asking this obviously did not ask this of themselves. The short answer is if the world economy is destroyed then billions of people will die of starvation. That's what happens one one third of agricultural land is no longer producing food, but is instead making biofuel - worldwide the price of food has doubled. For people in the first world that might not seem like a big deal, but for the majority of the people on the planet that is a huge problem: there were food riots in over a dozen regions of the world in the last two years.
Everyone gets solar panels and doesn't have to pay for electricity?
Of course! Why didn't I think of that? Oh, that's right, I have a job and bills, and I know that I can't get something for nothing. I have to work to get the things I own. So where are these solar panels for everyone supposed to come from? Should the government buy them for us? And where does the government get the money? Should it be taken out of Social Security, or Medicare, or should the government just print up more money as it needs it, like Zimbabwe?
On the other hand if we are right and do nothing because people distract us or mislead us what will all the deniers do to fix their mistake?
This past Saturday, the official temperature recorded at the airport ten minutes from where I live was minus 47 degrees Celcius, with a wind chill making it seem like minus 56 degrees C (minus 69 Fahrenheit) - for a short time it was the coldest place on the entire planet. I am damn glad of the modern technological conveniences that kept me from freezing to death in the dark. My great-great-grandparents didn't have those conveniences 119 years ago when they pioneered this area, and life was a lot harder for them.

If Al Gore is right (and he isn't and he knows it or he wouldn't have purchased a $4 million condo within walking distance of San Fransisco Bay, but let's just follow the hypothetical anyhow) then in the next century the sea levels will rise by some small value and the global temperature will rise by some other small value. Coincidentally over the next century our level of technology will continue to advance, so long as the economy is not held back by onerous taxation. The same technology that makes my life easier than that of my great-great-grandparents will be even more advanced as and if we encounter problems in the future - as long as we don't cripple our ability to make technological advances.

Let's turn the accusation around. In the 1960's Malaria was nearly wiped out through the widespread use of DDT, with around 50 thousand deaths a year. Then DDT was banned and the deaths skyrocketed to a million a year, for 40 years, until the UNWHO lifted its ban on the use of DDT. Rachel Carson has the blood of 40 million people - mostly children - on her hands, 40 million who died needlessly because of the ban on DDT, and where is she to answer for the carnage she caused? How does she fix her "Silent Spring" mistake?
After society collapses into rich vs poor and disease and hunger spread with the changing climate. I don't think "I told you so" would cut it..."
I will answer this and end with a quote by Robert A. Heinlein:
Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty.

This is known as "bad luck."

Thursday, December 10, 2009

Climaquiddick

Tiger Woods has been famous for a decade. Today I did a Google search on his name and got 27.9 million hits. I did another Google Search on Climategate - a word that didn't even exist a month ago - and got 16.1 million hits (interestingly, half as many as a week ago).

I don't see how Tiger Woods's personal life merits as much attention as the Climategate story. It is convenient for the "professional" "news" organizations to misdirect the hoi polloi while the biggest news story so far this century goes on under the radar, as the very reason for the COP15 conference - the theory of catastrophic anthropogenic global warming - is shown to be built on a collapsing house of cards. Jon Stewart scooped CNN:


Disclose.tv Jon Stewart on Climate-Gate Video


And Rex Murphy is apparently the lone voice of reason on the CBC:



Other than that, crickets chirping. Quite literally trillions of dollars at stake over the next... well, forever, in an unbreakable treaty that forces Canadians to freeze to death in the dark. Rand Simberg was right: it isn't Climategate, it's Climaquiddick. The former gatekeepers of information are trying to keep the information secret. Before the internet existed, they would have gotten away with it.

It ain't how science is supposed to work, and it ain't how journalism is supposed to work.

Sunday, December 06, 2009

Scientific Prostitution

If you haven't heard by now, you should. The entire Anthropogenic Global Warming scam has been blown wide open by a probable whistleblower in the East Anglia Climate Research Unit. The CRU is one of the most influential climate research centers in the world, and its results are used by other institutions (like NASA) to calibrate their own measurements. Here is the .zip file containing the "hacked" emails and most importantly the computer code. The HARRY_READ_ME.txt file is particularly interesting.

Right now in Copenhagen there are twety thousand delegates from some 194 countries around the world crafting a "Climate Treaty". They are using the fraudulent data used in the IPCC reports to show a man-made climate change problem that does not exist in the real world, but only exists in the fraud perpetrated upon you and me. How inconvenient is that truth?

The FOI2009.zip file was made available to the BBC a few weeks before it was posted on a Russian server and went überviral. It is the biggest scientific fraud of all time, with delegates in Copenhagen right now divvying up a quarter of the world's total economy in a treaty that would actually override the US Constitution and the Canadian Constitution.

We have to put a stop to this. This was science as prostitute, with a thesis so full of possibility for increased government involvement in your life and increase in the scope of government - in fact, the beginning of a World Government. It's like watching Atlas Shrugged unfold before me at a slightly quicker pace than actually reading the book itself.

Lord Monckton gave a speech in St. Louis in mid-October, a month before these files became public. Here it is. (>90 minutes)



Take that, Al Gore.

Tuesday, July 28, 2009

still alive and kicking

I'm still here, really. I've been working 100 hour weeks for the last couple of months, and have hardly spent any time at all on the internet (my email inbox is a nightmare). I'm still writing the AI 101 series - part 3 has been in about 6 rough draft forms, and parts 4,5,and 6 are in various stages of completion. I anticipate that regular posting should resume at the end of August or the beginning of September.

Friday, March 27, 2009

Artificial Intelligence 101 - part 2

Why AI?

Now that we have established what Artificial Intelligence is, let's look at why we would want to create such a thing. There isn't much point in creating something if we don't know why we would need it at all. We already have natural intelligence - human beings. What sort of advantages do we gain by developing artificial intelligence?

intelligence in nature

To help us answer this question, we first need to know what intelligence is used for in nature. The physical implementation of intelligence in nature is performed by neurons, so it is safe to say that any creature without a nervous system is incapable of intelligence. The simplest animal with a nervous system is Caenorhabditis elegans, which has exactly 959 cells in its body. 302 of those cells are neurons. All the other bodily functions - digestion, respiration, excretion, reproduction, circulation, and locomotion - are handled by the remaining 657 cells. This is an enormous portion of the animal's body being used to sense its environment, make decisions, and trigger actions, more than 31 percent.

Clearly this control system is important to c. elegans survival. Its nervous system is a third of its body, and hence demands a third of its nutritional requirements. So, why is such a large nervous system worth so much to c. elegans? The animal needs to feed on bacteria, which are unlikely to be right in front of its mouth all the time, so it needs to find those nutrients and get to them. To do that, it needs to sense its environment and find and eat its food. It needs to move its body around up, down, left, and right through the soil. It needs to sense damage to its body and move to avoid the source of the damage if possible. And it needs to perform certain automatic functions within its body, such as flushing waste from its system. These behaviors and capabilities allow c. elegans to survive within its simple environment.

C. elegans has a nervous system. Does that mean that it has intelligence? Well, it certainly makes choices (left or right?). The environment provides it with immediate feedback, which then subtly modifies the connections between and firing patterns of neurons (and this makes c. elegans useful for the study of nicotine dependence). Finally, such properties are not inherent in a single neuron, but only emerge when a group of neurons work together. Therefore, according to the definition in part 1, c. elegans has intelligence. Not a lot, and not particularly smart, but it is there. It uses that intelligence to allow basic behaviors such as controlling movement.

If we look at some larger animals with more complex bodies and nervous systems, we start to see animals with brains - a localized cluster of an enormous number of interconnected neurons. At each evolutionary step, much of the structure of the brain is retained (as long as the parts remain useful) and new capabilities are added. These larger animals have more complicated environments than c. elegans, as they operate at a different physical scale. They are forced by evolution to add adaptations like predation and mating calls and so forth, each of which are controlled by new neural structures and combinations of structures in the brain.

Over a long period of time, those structures which enable survival spread as species evolve and diverge. For instance, we all have a portion of our brains which are "reptilian", inherited from a long-ago ancestor, which controls basic functions like rage or fight-or-flight. Human beings have a far more complicated brain structure than any other animal. While we have retained the reptilian brain, a lot more stuff has been added over evolutionary history. With each new addition, a new set of capabilities emerged as the new structure interacted with the preexisting structures.

This is true for all the macroscopic animals. Each has evolved over time, sharing some structures (both within the brain and within the rest of the body) from remote ancestors and sharing others only within their genus or species, or unique to the animal itself. Each new structure, when integrated with the old structures, provides new behaviors, such as flight or echolocation. Each contributes to the intelligence of the animal and hence the capabilities of the animal.

So, we have a partial answer: in nature, animals use intelligence to enable them to make choices and have various capabilities and behaviors which they would be unable to have without intelligence. And, we want to give our machines the ability to make choices and to have various capabilities and complex behaviors.

automation

Next, let's look at the "Artificial" part of AI. Although we could make our AI with any computational device (even Tinkertoys, Legos or Meccano), for simplicity we'll use computers. Whenever we create anything which performs some process in computer software and hardware, we are by definition automating that process. Why would we want to automate intelligence?

To help us answer this question, let's first look at some examples of automation. If we require some task to be done exactly the same way over and over, then it makes sense to build a machine to perform that task automatically. If we want to explore the surface of Mars, and it would be expensive and dangerous to send a manned mission first, then we send a machine to perform that task for us. If we want to control traffic signals, then it is far more efficient to automate the process, rather than having someone manually controlling all of the signals in a city. If we want to decelerate a vehicle on an icy road, then anti lock brakes automate the process of rapidly pressing and releasing the brakes much faster than any human can.

Human labor is expensive compared to automation. While it is possible for a team of people to control all of the traffic lights in a city, people get bored or sick or take vacations, and they need breaks for lunch and cannot work 24/7. A machine that controls the traffic signals can operate continuously, never takes a sick day, and never needs to be paid. Automation makes sense for that task, and indeed traffic lights have been automated everywhere. At first, the control systems were simple timers, but that can lead to problems like cars sitting at red lights for unnecessary lengths of time, poor synchronization between signals causing traffic jams, and so on. Over the years these systems have become more sophisticated, with pressure sensors embedded in the roadway monitoring traffic flow and providing feedback to the control system. Ideally, all of the traffic lights in a city would be operated in such a way to maximize the flow of traffic and minimize delays, saving all commuters time and gasoline. A control system with more intelligence controlling those lights would allow traffic to flow with fewer unnecessary red light delays and with a smoother flow than a simple timer system.

As machines become more complex, direct human control is possible only in the broadest sense. The driver of a car can steer, press the accelerator or brake pedal, operate the gear shift, and control the lights and signals to other drivers. The driver cannot directly control such things as the timing of the firing of the spark plugs, the fuel to air ratio, the angle of the steering wheels, how much power to apply to each wheel, and how much force to apply to each brake pad. On older cars, that was all handled by indirect mechanical means, which meant such things as skidding on icy roads or losing control in corners. On modern vehicles, those indirect controls are handled through the car's computer. Besides the control signals from the driver, these vehicles have additional sensors throughout the car, which monitor the car's environment and use that feedback to directly control the vehicle's wheels, steering and brakes. This layer of automation between driver and vehicle allows such things as anti lock brakes, traction control, and other features like airbags. Each of these systems improves the safety and efficiency of the vehicle, but requires simultaneous control of multiple systems many times per second. That is too much information to process, too many repetitive decision to be made, and too many things to control at once for a human driver, so the process has to be automated. The smarter the vehicle can be made, the greater the improvements in safety and efficiency - at least theoretically, assuming people don't make bad choices while driving.

What can we learn from these examples? Generally speaking, it is desirable to automate some function if it is too expensive, repetitive, tedious, complicated, or dangerous for humans to perform directly.

so, why AI?

A machine must be controlled in order to be useful, and without control a machine is dangerous - imagine an uncontrolled semi during rush hour. Some machines are simple, and simple software can be used to control them. Other machines, like the aforementioned semi, are more complicated and operate in a complex environment, and so (for now) they require human control.

Everything that is automated already has a control system. These range from simple mechanical controls (like a thermostat with a Mercury switch) to highly sophisticated electronic hardware and computer software. In nature, there is obviously a range of intelligence between species and within a species. It isn't a simple linear scale, as each new capability in effect provides another axis along which to measure intelligence - if a new application of intelligence isn't different in degree, then it is different in kind. And with automation there is obviously a range of intelligence required to operate our machines, with simple machines needing very little or no intelligence and more sophisticated and complicated machines requiring more complex control.

However, even the simplest of control systems can be improved with the application of artificial intelligence. Let's take the thermostat in your house as an example. In older thermostats, the furnace blower would come on if the temperature fell below a certain value and would turn off again above some other value. These values were determined by a set point on the dial; if it was a few degrees colder than the set point (moving the Mercury switch one way) then the furnace blower came on, and if it was a few degrees warmer than the set point (which would move the Mercury switch the other way), the furnace would shut off.

That isn't a particularly efficient way of operating the furnace, but it works. This can be improved, though, with some simple electronics and software. The problem being solved by the control system is well-understood and easily simulated. Causal relationships and the interrelationships between variables are well-understood and precise mathematical relationships can be derived and programmed into the control system software in the factory, long before actual use of the control system. Indeed, the vast majority of non-mechanical control systems do not use artificial intelligence, as much simpler PID controls will suffice. The Proportional/Integral/Derivative control system would allow for more precise adherence to the set point while using less energy to do so than the mechanical switch; indeed, PID controls are useful in an enormous range of applications and are ubiquitous.

In contrast, a fuzzy logic (this will be covered in AI101 part 5) control system on a thermostat allows for much smoother control of the furnace, turning the furnace blower on and off in a very slightly more efficient manner than PID. The gain in efficiency in use of the furnace can lower the heating bill by a significant amount. Of course, for trivial applications using an AI control system could be considered overkill. Most thermostats work just fine with a strictly mechanical control or PID control. If the cost of the AI control system is more than the savings due to the efficiency of using AI, then it doesn't make sense to use AI at all.

But what if the system being controlled changes over time? In that case, a mechanical or preprogrammed control system may not work properly and may act inappropriately. In such cases, the control system would need to recognize that its model of the system is in error and adapt its model by changing various constants it uses in its calculations - which brings us right back to the feedback part of the definition of artificial intelligence.

The thermostat has only two variables to deal with, the temperature and the set point. What if the system being controlled is not so well understood or easily simulated? What if there are a large number of variables whose interrelationships are nonlinear or otherwise unclear? It may not be possible to preprogram a control system in that case, and instead such a system needs artificial intelligence in order to learn those interrelationships.

And what if direct, real time human control is not possible? A robot can be sent to the bottom of the ocean, but seawater absorbs radio waves and so the robot must be tethered to the surface, and the robot cannot explore very far - and on its own, not at all. Robots have been sent to Mars, but the light-speed time delay forces ground controllers to guide the robots in small, incremental movements, and then wait three quarters of an hour for feedback - and those robots spend the vast majority of their working lives waiting through these light-speed communication delays. If instead the robot was equipped with an artificial intelligence that would allow it to safely maneuver about and do science on its own, then the ground controllers could give much more infrequent, general commands and spend most of their time downloading data.

bringing it all together

We want to control our machines so that they perform certain complex behaviors and possess certain capabilities, and for many applications simple control systems work just fine. However, if there are changes to the machine over time, if efficiency is at a premium, if the system is extremely complex or otherwise poorly understood, or if the environment is complex and changing over time, then we need artificial intelligence to get the desired behaviors from those machines.

In part three of AI101, we will look at some of the history of AI, from Golems to Dartmouth. Then in parts four, five, and six we'll look at some of the more promising strategies for developing artificial intelligence: neural networks, fuzzy logic, and genetic algorithms.

Wednesday, March 04, 2009

Artificial Intelligence 101

Update, October 2011: For a different take on the subject, Stanford University is offering an online Introduction to Artificial Intelligence class; the first video is available here.

part 1: what is intelligence?

When building an artificial something, it helps to know what the natural version of that something is. For example, when building a prosthetic leg, having an idea of what a natural leg is, what it is used for, how it interfaces with the rest of the body and so on is critical; without that information, the artificial version of a leg might have wheels or a knee that bends in all directions or so much mass that walking becomes impossible. There are details which are important to our purposes (such as the placement of the big toe, which is essential for balance), and details that are unimportant (like the exact number and placement of hairs on the leg) - and we need to figure out which of those details are important, to incorporate them into our artificial device.

However, "intelligence" is an abstract concept, not a concrete object like a leg. It cannot be weighed or measured with a ruler or touched. Instead we need to describe what we know about intelligence and how it is used. Moreover, we need to be able to evaluate our attempts at creating artificial intelligence, so that we can compare approaches, make improvements, and ultimately decide whether what we have made is indeed "intelligent".

Dictionary.com defines intelligence as
capacity for learning, reasoning, understanding, and similar forms of mental activity; aptitude in grasping truths, relationships, facts, meanings, etc...the faculty of understanding.
That's pretty broad, and it requires knowing what we mean by such words as learning, understanding, meaning, consciousness and so on - concepts that themselves are all interlinked with what we mean by intelligence in the first place. Marvin Minsky wrote in The Society of Mind that
it isn't wise to treat an old, vague word like "intelligence" as though it must define any definite thing. Instead of trying to say what such a word "means", it is better simply to try to explain how we use it.
Our minds contain processes that enable us to solve problems we consider difficult. "Intelligence" is our name for whichever of those processes we don't yet understand.
Neither of these definitions really helps us to decide if whatever artificial intelligence we make is actually "intelligent".

Each of us is conscious of our own intelligence, and we infer intelligence in other people based on our observations of their behavior and our past interactions. And it isn't only in other people that we observe intelligence; we see it in animals, too. Dogs can certainly exhibit intelligence, as any dog owner will tell you. Chimpanzees can learn to communicate with sign language. Dolphins are pretty darn smart. If animals can exhibit intelligence and some degree of consciousness, then this implies that there is nothing mysterious or magical about thought, consciousness, emotion, creativity, learning, empathy, or any of the qualities of the brain that we call "intelligence". Indeed, intelligence is rather common, in various forms and degrees - and there is nothing magical required to reproduce that in a machine.

So what would be a useful definition of intelligence, something we can use as a working model of thought for a machine?

It is probably counterproductive to define intelligence too narrowly. As early as 1958 is was predicted that "within ten years a digital computer will be the world's chess champion" - and on May 11, 1997, Deep Blue beat the reigning world chess champion, Garry Kasparov. Today, Kasparov is deeply involved in Russian politics, and Deep Blue ... can play chess.

Alan Turing proposed a test in which
a human judge engages in a natural language conversation with one human and one machine, each of which tries to appear human. All participants are placed in isolated locations. If the judge cannot reliably tell the machine from the human, the machine is said to have passed the test. In order to test the machine's intelligence rather than its ability to render words into audio, the conversation is limited to a text-only channel such as a computer keyboard and screen.
Anyone who has been fooled by a chatterbot, however briefly, would probably concede that Turing's test has likely been passed on numerous occasions - and dismissed as "not really artificial intelligence".

The challenges of playing chess at a world-class level or chatting over the internet do require intelligence in human beings, but defining such tests as indicative of intelligence in and of themselves is too narrow of a definition, and solving only those narrow problems doesn't tell us anything about the nature of intelligence in general. Within their very limited domains, they work fine - but take Deep Blue out of the 64-square universe of chess and it is lost.

In the late 1980s, researchers began to put forth the idea that in order to show true intelligence, the machine needed to have a body, to interact and deal with the real world. As Rodney Brooks said, Elephants don't play chess. It is the real world that presents the challenges for survival to an animal, and a choice made by that animal can mean the difference between reproducing and being something else's lunch. And if an artificial intelligence has a body and must deal with the real world, controlling itself and avoiding obstacles and so forth in real time, then its control system must be a more robust version of AI than is required to deal with any simulation.

In the real world, intelligence is a quality of the animal mind that allows it to make choices and perform actions that enable it in the short term to consume food and acquire the other necessities of life while avoiding lethal situations, and in the long term to survive enough short-term needs that it can live long enough to reproduce.

OK, so that definition is still pretty broad, but it's a good starting point: intelligence is the ability to make choices that enable survival.

A rock rolling down a mountainside cannot make choices - it simply moves where its own momentum, friction, and gravity dictate. A plant slowly twisting to track the sun isn't making any choices - it only points towards the strongest light as it is forced to by its own structure and the laws of Physics, and it would follow a more intense artificial light if one was present. When you burn your hand on a stove and your reflexes cause your arm to jerk away from the heat, you're not making a choice either - a direct connection in your neural wiring leads from your pain receptors to the spinal cord and back to the muscles of your arm, and the laws of Physics force the movement of your arm.

In the above examples, the action taken in response to a stimulus is completely dictated by the laws of Physics. Does that mean that the ability to make choices somehow exists outside of those physical laws? Do we need to invoke something supernatural in order to explain consciousness or intelligence or free will?

No, we don't. Everything that happens in this universe happens according to the laws of Physics, without exception, whether we realize it or not. Everything we do, every thought that we have, every choice we make, is dictated by the laws of Physics just like a falling rock's path.

So what is the qualitative difference between a falling rock and, for instance, me choosing which word to type next? From the perspective of the laws of Physics, there is no difference.

Layers of Abstraction and Emergent Properties

A proton is a proton is a proton. Every proton in the universe is exactly the same as all the others. The behavior of every proton is exactly the same as every other one. If a proton is removed from the nucleus of an atom, and immediately replaced with another proton, then the atom is exactly the same as it was before. There is no difference.

Likewise, every neutron is exactly the same as every other neutron, and every electron is exactly the same as every other electron. Each always follows the laws of Physics, in particular the conservation laws of mass/energy, momentum, angular momentum, and charge.

However, protons and neutrons and electrons do not exist in isolation. Each contributes to the electromagnetic field and gravitational field, each occupies some region of spacetime and each interacts with all the others.

When protons, neutrons, and electrons are proximal, then they combine with each other to form atoms - a positively charged nucleus containing protons and neutrons, and a negatively charged cloud of electrons bound to the nucleus through electromagnetism. The interaction of the electrons with each other gives certain regions of the atom that can combine with similar regions of other atoms, sharing electrons between the two atoms and forming a chemical bond. This allows molecules to form, and the interactions of molecules with each other gives us all of Chemistry. Specific patterns of molecules give us things like RNA and DNA and adenosine triphosphate and hemoglobin and ribosomes and all the other compounds necessary for life.

That falling rock is made of the same protons and neutrons and electrons as exist in your left hand. There is no difference whatsoever between a proton in that rock and a proton in a molecule of your hemoglobin, and those two protons could be exchanged without there being any difference to either the rock or your blood.

The building blocks are the same. The rules are the same. If there is no difference, then how come that rock and your left hand look different, behave differently, and have different capabilities?

The difference lies in the way that those fundamental building blocks are arranged. At a basic level, they are merely identical protons and neutrons and electrons, but go up a couple of levels of abstraction and they are arranged into different molecules with different behaviors. Each of those molecules still follows the laws of Physics exactly, but because of the way that the atoms are arranged in each, new properties of the molecule begin to appear.

A property like viscosity or temperature does not exist for an isolated atom, but go up one level of abstraction, where the fundamental building blocks combine to form molecules, and those properties emerge. Go up another level of abstraction, where the molecules form cells, and you get new properties emerging such as cell division. At still higher levels of abstraction, as cells combine and specialize to form a multicellular organism, we see still further properties emerging, like respiration and excretion. Go up another level of abstraction and still more properties emerge, such as the flight of a bumblebee. At a higher level of abstraction we see still more properties emerging, such as the density waves that occur in rush-hour traffic.

Likewise, a bit is a bit is a bit - to a computer, it doesn't matter whether that bit is stored within RAM or on a hard drive or a CD or is transmitted over the internet. It is either a logical 1 or a logical 0. By itself, a 1 or a 0 isn't particularly interesting. It is logically equivalent to a light switch on your wall - when it is a 0 the light is off and when it is a 1 the light is on. However, those ones and zeros can be combined, and new behaviors can emerge when we take them to a higher level of abstraction. For instance, two such bits can be combined in a digital logic gate, like a NAND gate. In a NAND gate, the output depends on the state of the two inputs: if both inputs are a one then the output will be a zero, and if either input is a zero then the output is a one.

This NAND gate might not seem particularly useful, by itself. However, by linking together NAND gates in a network we can create any digital circuit. These arrangements of NAND gates represent a new level of abstraction, and as such new properties emerge. Depending on the way that these gates are linked together, they can act as a group to form a frequency generator, or a flip-flop, or a binary adder, or a shift register, or a comparator, or a latch. These circuits can be optimized - they don't need to be made from NAND gates, although they could - and themselves combined in a new level of abstraction into such things as microprocessors and RAM and peripheral interface circuits. These have new capabilities which emerge, such as running a machine-language computer program.

The individual machine language that works for a particular microprocessor will not work for another microprocessor whose circuits are arranged differently. So, a higher level of abstraction is needed, where programs can be written in a common, higher-level language like C++, and then compiled into the appropriate lower level machine-language program. And once again, at this higher level of abstraction new capabilities emerge: operating systems, web browsers, games, spreadsheets, databases, file sharing, websites, search engines, blogs, and so forth.

One particular computer program can illustrate this point further. In 1970, John Conway proposed a game he called Life. In this game, a display grid is made up of pixels, each of which can be either ON or OFF. Each pixel has eight neighbors: above, below, left, right, and four diagonal neighbors. The rules are simple - if a pixel has fewer than two or more than three neighbors in the ON state, it goes OFF at the next clock cycle. If it has exactly three neighbors ON, then the next clock cycle it goes ON. And if it has exactly two neighbors ON, then it is unchanged on the next clock cycle. The behavior of the system is entirely dictated by the initial states of the pixels in the grid and by those simple rules.

Now, we take it up one level of abstraction, and observe the behavior of a group of pixels over many clock cycles. When the pixels are interacting with each other as a group, each affecting all its neighbors, we begin to see patterns emerge. One group of five ON pixels arranged in a particular way acts as a "glider", which re-forms the original five-pixel pattern four clock states later, shifted one pixel diagonally from the original position. Over time this glider acts like a photon, moving in a straight line at the "speed of light" for the simulated universe of the game, one diagonal pixel every four clock cycles. Other structures also become apparent, such as the Glider Gun (which produces gliders one after the other) or a Breeder (which creates a series of glider guns). Starting with a "universe" and applying simple rules at the lowest level of abstraction, we see higher-order behaviors and structures emerge as we observe higher levels of abstraction.

In all these examples, each time we look at a higher and higher level of abstraction, we find new properties emerging - each still following the laws of Physics, each property dependent upon the properties of lower levels of abstraction, and each property emerging only as those building blocks at lower levels combine to form a new structure with properties not possible at the lower level of abstraction.

And so it is with intelligence. The components that make up our brains, from the fundamental building blocks to the atoms and molecules and the neurons themselves, each follows simple rules ultimately dictated by the laws of Physics, but each exhibiting emergent behaviors as they are linked together in higher and higher levels of abstraction. The individual neuron by itself is not intelligent, but combine neurons together and they start to form functional groups. Each group is capable of performing some specific computational task, and each is, by itself, unintelligent. However, if we go up another level of abstraction, these functional groups combine and interact with each other and new properties emerge, such as controlling your heartbeat. And as we continue to increase the level of abstraction and combine less-capable structures together in different ways, still more new properties begin to emerge, like the fight or flight response.

So we can now say this about intelligence in general: functional groups of neurons, each unintelligent by itself, combine with each other to introduce new capabilities at a higher level of abstraction - and taken as a group, these emergent properties are what we call intelligence:
Intelligence is an emergent property of the combination of unintelligent functional groups.
This doesn't mean that we can create these functional groups and simply stir them together in a pot and pow intelligence appears like magic. There are an infinite number of possible functional groups, and an infinite number of ways to combine these lower-level functions into higher levels of abstraction, and we don't have enough time to try them all.

Fortunately, we don't have to try them all. No animal has to try every possible combination of neurons in its brain in order to exhibit intelligence - the physical structure of the animal's body, with its inherent capabilities and long-term stability, forces the formation of long-term structures of neurons specific to its body. The connections between these structures are themselves other neural structures, which can be used in the same way as the lower-level structures but which perform higher order tasks. The structures are not randomly connected in all their infinite number of possible combinations; those which are useful are retained, and those which are not useful are not retained.

feedback

So, back to the development of our definition: how do we go from combination of simple unintelligent structures into higher levels of abstraction, to the ability to make choices?

The decisions an animal makes have immediate consequences. Imagine a pack of wolves hunting a deer. As the deer runs, the pursuing pack limits the options of the deer's movement, and so does the terrain in front of the deer. Suppose the deer sees a tree directly ahead. It has a number of options available: turn to the left, turn to the right, stop, or slam into the tree. Whatever option the deer chooses, the consequences are immediate - the deer either manages to escape for a few more seconds or it is caught and killed by the wolves. If the deer makes enough correct decisions, then it may survive long enough for the wolves to catch another deer and lose interest in our deer.

It is the deer's interaction with the real world that forces it to make decisions, over and over and over again. The deer's mind has functional structures, some preprogrammed by genetics and others learned over the deer's lifetime, and the interaction of these structures - in our example, the structures responsible for sight, smell, heart rate, respiration, and muscular control - which allow the deer to recognize the pursuing pack as a threat, the tree as an obstacle to be avoided, and so on. Good decisions lead to the temporary survival of the animal, and a poor decision leads to the animal's death.

In other words, the real world provides immediate feedback about the effectiveness of decisions. If a decision doesn't kill an animal - suppose it instead receives a minor injury - then that feedback allows the animal to evaluate its decision and make modifications to the connections between functional groups or to the functional groups themselves so that same decision is less likely to be made in the future. Positive feedback - anything that gives the animal pleasure, such as a full belly - also modifies the connections between functional groups in such a way that the structures that led to the decision are reinforced, so that a good decision can be repeated in the future.

Over the animal's lifetime, with the millions of decisions it makes over and over again, and with the real-time feedback provided by the animal's environment evaluating those decisions, the functional structures within its brain and the connections between those structures are constantly modified.

bringing it all together

Let's summarize what we know about intelligence:
1) Intelligence requires the ability to make choices
2) Intelligence is an emergent property of the combination of simpler, unintelligent functional structures
3) the real world provides immediate feedback to evaluate choices; that feedback then changes the unintelligent functional structures and the connections between them
That's it; that's all we need for a working definition of intelligence. With whatever AI we create, we can ask ourselves: is it making choices? are properties emerging from our simpler building blocks? are those choices evaluated and modified by interaction with and feedback from the real world?

In the next installment of Artificial Intelligence 101, we'll look at why we want to create artificial intelligence, and examine past attempts at doing so.

Update July 21, 2011:

The part about choices needs some expansion. Inherent in the ability to make choices is the ability to produce those choices as a synthesis of memory and sensation, and the ability to make predictions about those choices. In the video appended below Jeff Hawkins makes the convincing case that even the sensations themselves are being predicted by the mammalian part of the brain.


The options available to the deer in the example above are being constantly produced and their results predicted; the best prediction becomes the choice, over and over again. Part of the deer's mind is predicting where its foot will make contact with the ground, and if the prediction and reality don't quite match up - say there's a dip in the ground - then new predictions need to be made to match sensation. Prediction is at the foundation of choice and shapes the sensation of reality.

Thursday, February 26, 2009

just giving it all away

From about 1990 to about 2003 I spent most of my spare time working on artificial intelligence research. The last few years I have gotten away from that to work on some other interests, but lately I have been looking through and re-reading some of the thousands of pages of notes and tens of thousands of lines of code I wrote back then. And, I've been thinking, it would be a real shame if all of this work were to simply be lost, if I were to not work on it anymore and nobody else knew about it.

So, I've been giving serious consideration to simply publishing all that work right here on this blog, and letting others have a look, critique, and take whatever they find useful for their own work.

This raises some serious questions for me. Is it dangerous to let just anyone have access to something with the potential to be used as a terrible weapon? Is it even ethical to do so? Would I have spent over ten thousand hours working on what amounts to my masterpiece, only to have nothing to show for my efforts except a series of blog posts and a stack of notebooks?

Well, after a lot of thought on the matter, I have decided that the ethical questions are irrelevant - what I have created is merely a tool, and whether others use the tool for good or ill is up to them. And as for personal reward, well, while I was doing it the work was reward in and of itself, and if the ideas I came up with spread to the right minds then it is possible that everyone's life will benefit. Hey, it could happen.

So, I'm going to do it. I'm going to just give all my AI research away on my blog.

Since most of my readers would have no idea what I'm talking about if I just dove into the middle of it, I'll start over the next few weeks with some of the history and basic concepts of artificial intelligence. After that, I'll start putting forth my own work.

Wednesday, February 18, 2009

When is a recession not a recession?

For several months now, I have heard plenty of wailing and gnashing of teeth over the supposed recession. But is it really happing?

First of all, let's start with the definition of a recession: two consecutive quarters of negative growth in the economy. When Prime Minister Stephen Harper conceeded that Canada could be "technically" in a recession, he was absolutely right - that could indeed be the case. He could have said the same thing two years ago and still been right, even though the economy was booming at the time. When you are in the middle of a recession, there is no way to know for certain if you are or not - it is only by looking back at the previous two quarters that one can say with certainty that a recession has occurred.

So without that data, how come the press has been screaming "recession!" for several years?

Yes, the housing market took a beating over the last six months or so, but the housing market is not the entire economy. Anyone paying any attention to the housing market over the last few years would have seen that the housing prices were well above the actual value of the homes, and would put off buying until the housing bubble popped. Yes, GM and Ford are treading water and slowly sinking, but does that have anything at all to do with today's economic conditions?

Sixty percent of the economy is consumer spending - everything from home furnishings to beer to bubble gum. Housing and cars and other big-ticket items are not part of that. So, if enough people finally start to believe that there is in fact a recession, then their spending will drop and you will indeed get your recession. It becomes a self-fulfilling prophesy, as long as the press screams recession! long enough and loudly enough.

So is there really a recession going on? For the answer, we'll have to wait at least until the end of the quarter. But, until then, I think that one needs to look at the "canaries in the coal mine" of the economy.

If there is a recession then the ones who will go bankrupt first are the ones who live the closest to the edge of bankruptcy all the time - farmers. Go for a ride in the countryside and look for the "For Sale" signs. How many do you see? I have driven thousands of kilometers around the countryside in my area over the last few months, and I have seen a grand total of two for sale signs.

Another canary to look for is trains. Count the number of cars in the next train you see. Compare that to the number of cars that trains were hauling two years ago. See any difference? See any difference from 1981? I sure do - back in '81, there were a lot fewer cars being hauled at any one time, and there were fewer trains. The last train I saw a few nights ago was pulling over a hundred cars. Can a railway afford to do that unless there is demand to move that amount of goods? Does that sound like a recession to you?

One more canary is the Help Wanted ads. Here in the Edmonton Alberta area, there are so many jobs available - good jobs - that many companies have taken ads out on the radio advertising positions. Not just oil companies either, but all sectors of the economy. Is that a recession?

What are the canaries like in your area?

Evening update: I am betting that you are seeing the same things that I am - very few farms for sale, lots of cars on the trains, plenty of jobs available. That doesn't look anything like a recession to me. It certainly doesn't look like the recession of '81, when over half of the farms in this area were for sale, trains were pulling 40 cars, and there were no jobs available.

So, why has the press been screaming recession! for years? Who benefits from frightening consumers? Who benefits from ramming an $800 billion "stimulus" package through Congress and the Senate, and similar bailout packages in Canada and other G7 countries?

Well, it certainly isn't average people. That stimulus package is costing every man, woman and child in the USA $2600 apiece. There goes a big chunk of your kids' college fund, poof gone. And where is it going? To prop up GM workers making overpriced union wages and benefits, which will sink the company in a few years anyhow? To expanding the power of government over your life, in the amount they will increase your taxes and regulations controlling your life, to adding to the debt load the baby boomers are leaving their great great great grandchildren?

The people of the USA (and by extension the people of every country with economic ties to the USA, in particular Canada) are being frightened and swindled and glibly accepting the most massive intrusion into their finances in history - all based on a supposed recession for which there is no evidence until the end of the quarter. Who benefits? Who has a vested interest in frightening average people and forcing through this huge increase in government spending with little debate?

Look for yourself, check out the canaries in your area. Has the press been telling the truth about the economy? Or have they been telling you deliberate falsehoods in order to benefit their friends in the unions and Leftist political parties?

Wednesday, February 11, 2009

I'm back

I've kept pretty silent over the course of the US and Canadian federal elections. Often I've thought of something that would make a great blog post, but just didn't sit down to do it for one reason or another. Time has been a factor, of course, but so has my frustration - I didn't want to sit down and write anything about the American election in particular, for it was obvious what was going to happen, and no amount of reason or logic would change the result.

At any rate, I'm back now and will be posting regularly again.